<?php

namespace mbilling\BillingBundle\Model;

use Doctrine\ORM\EntityManager;
use mbilling\BillingBundle\Entity\domainsStatuses;


Class DomainsStatusesModel
{
    protected $em;

    public function __construct(EntityManager $em)
    {
        $this->em = $em;
    }

    public function findAll()
    {
        $statuses = $this->em->getRepository('BillingBundle:domainsStatuses')->findAll();
        return $statuses;
    }
    
    public function create($oEntity)
    {    
        $this->em->persist($oEntity);
        $this->em->flush();
    }
    
    public function removeByPK($status_id)
    {
        $status = $this->em->find('BillingBundle:domainsStatuses', $status_id);
        $this->em->remove($status);
        $this->em->flush();
    } 
}
?>
